package com.whmnx.main.ui.adapter;

import android.content.Context;

import androidx.recyclerview.widget.RecyclerView;

import com.classic.adapter.BaseAdapterHelper;
import com.classic.adapter.CommonRecyclerAdapter;
import com.whmnx.base.bean.PingBean;
import com.whmnx.base.utils.ImageUtil;
import com.whmnx.base.utils.TimeUtils;
import com.whmnx.main.R;

import de.hdodenhof.circleimageview.CircleImageView;

/**
 * author : huang
 * date   : 2020/10/19 0019 9:17
 * version: 1.0
 * @author Administrator
 */
public class PingJiaListAdapter2 extends CommonRecyclerAdapter<PingBean.ChildListModelBean> {
    Context context;
    public PingJiaListAdapter2(Context context) {
        super(context, R.layout.item_ping2);
        this.context = context;
    }


    @Override
    public void onUpdate(BaseAdapterHelper helper, PingBean.ChildListModelBean item, int position) {
        helper.setText(R.id.tv_Product_Name, (String) item.getUserName());
        helper.setText(R.id.tv_time, TimeUtils.getFriendlyTimeSpanByNow(item.getCreateDate()));

        helper.setText(R.id.tv_Product_SPEC, (String) item.getRemark_Content());
        ImageUtil.setImage((CircleImageView)helper.getView(R.id.iv_img), item.getUserImage());

        RecyclerView rlList =  helper.getView(R.id.rl_list);
    }
}
